package com.cloud;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import feign.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class CloudService01FeignApplication {

    public static void main(String[] args) {
        SpringApplication.run(CloudService01FeignApplication.class, args);
    }


    /**
     *  全局配置Feign负载均衡生效
     */
   /* @Bean
    IRule random(){
        return new RandomRule();
    }*/



    @Bean
    Logger.Level debug(){
        return Logger.Level.FULL;
    }

}
